home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-15 | 9.2 KB | 200 lines | [TEXT/ttxt] |
- Thank you for downloading the ALPHA version of httpd.
-
- WARRANTY
-
- This program is supplied free with absolutely no warranty and may do unthinkable damage
- to your machine or data, for which I will accept no liability. Having said that, I didn't write
- it to do that, but you must satisfy yourself it will not do any damage before using it.
-
- ABOUT HTTPD
-
- httpd is an fba (Faceless Background Application) that implementsa minimal http server.
-
- It is curently in ALPHA version. That means it is an early release, possibly full of bugs.
- It currently only supports the GET method, with full or simple requests. It also completely
- ignores accept fields from the client and blindly spews out the files requested, without
- any header information.
-
- WHAT DOES THAT MEAN ?
-
- That means it should just work. It could be a lot better though and there will be some
- improvements for the BETA version. You should be able to write pages with images, and
- have separate image, sound and movie files. It will probably all work. It has worked for me.
-
- I have tried using MacWeb and X-Mosaic and X-Netscape to retreive pages. However due to the
- lack of MIME support, it is possible you may find clients that do not work with the
- ALPHA version. I guess the ones I have tried make some assumptions about the file they requested.
-
- WHY HTTPD ?
-
- There is one other http server I know of for the Mac which is not free. The aim of httpd is
- to provide a free httpd server, which implements enough to serve out pages on your mac,
- without it putting an enormous load on the machine. It is designed to be lightweight
- and fast.
-
- It may not be much good if you expect to have loads of pages and images, or if you want to
- do more than just serve out static pages of HTML. At this stage I do not know how many pages
- and what sort of load it can reasonably handle. Perhaps someone could tell me how it fares.
-
- RUNNING IT
-
- Just launch it. It will look for its config/prefs file firstly in its own folder, then in the
- prefs folder. If it does not find it, it creates it own from default resource info and quits.
- This prefs file can be edited to set up httpd how you want. You will find this prefs file in
- the preferences folder (within System folder) You can place this prefs files in the same folder
- as httpd or leave it in the prefs folder. (See next section) Now re-launch.
-
- Use a text editor to edit the prefs file. There are comments within it to help you. It
- would probably help if you knew a bit about servers, http etc, but the sample prefs will work
- so if you know nothing except how to write WWW pages then you could just re-launch. Apologies
- for the fact that a lot of the configuration options don't work yet. Sometimes I call the prefs
- file a config file, but I'll try to acoid that from now on.
-
- MULTIPLE INSTANCES
-
- Just copy httpd for each 'server' you wish to run. Place the copies in separate folders and
- create separate prefs files, also placing these in the folders. Set them up to run on different
- TCP ports and then launch them all. Make sure you set them up to serve on different TCP ports
-
- Although it will not detect multiple servers on the same port and will appear to run fine,
- you may get some unexpected results.
-
- WWW FILES
-
- httpd can potentially serve any file in the same folder as the app. This is the same if you
- launch it by means of an alias (Say by putting an alias in the startup items folder). If the URL
- '/' is requested (ie 'http://host.name/') httpd looks for the file 'home.html'
-
- '/' delimiters in the URL indicate sub-dirs in the usual manner (even though the specs say
- the use of the same delimter as is used for UNIX directories is co-incidence)
-
- You can happily use the '.' and '..' format for relative URLs, well, with the clients
- I tried anyway. You cannot (yet) put folder aliases in the app folder to serve out files from
- elsewhere. All httpd understands at the moment is normal folders and files. It does not
- distinguish between text, sound, or image files, or by file type or creator, or suffix.
-
- Make sure of course that sound/image files you serve out match what the client expects, the
- stadard format seems to be Sun ULaw sounds format and GIF image format.
-
- HOW DO I WRITE WWW PAGES
-
- If you don't know I'm not going to explain it here. There are places you can find out though.
- I would suggest looking in CERN's WWW pages as that is where it all started. Alternatively
- try NCSA (http://info.cern.ch/ or http://www.ncsa.uiuc.edu/)
-
- WWW pages are actually just text file written in a language called HTML, and include pointers
- to the image and sounds files etc. These files can be local to the machine or served out from
- a remote machine. Some client programs like MacWeb, come with local files written in HTML
- explaining how to set it up. These are often set up as the home page as default. You'll
- get an idea simply by looking at those with a text editor.
-
- POSSIBLE IMPROVEMENTS FOR A BETA RELEASE
-
- - Write code to generate object headers
- - Code for reading in MIME type info
- - Understand client accept fields and act on them, maybe
- - dnr code
- - Access logging
- - Error logging
- - Code in many more debug messages for debug file
- - Handle debug buffer command in prefs file
- - Prevent serving out of logs and prefs file etc, perhaps by an exclude creator ?
- - Do prefs file syntax check
- - disintegrated cache (each element is bigger than the last by 2, starting with a small one)
- (I know what this means even if you don't)
-
- FUTURE VERSIONS MAY ALSO.....
-
- - Allow remote changing of configuration by Program Linking. Also a restart option so that
- the program is effectively restarted, should the configuration changes be made.
-
- - Be able to resolve aliases, including guest account remote volumes, allowing users with
- sys 7 to create and publish pages, using file sharing and guest login.
-
- WHAT IT MAY NEVER DO.... (Depends if I can be bothered)
-
- - Support Applescript or anything that might be needed for interactive pages ie
- Search Functions
-
- - Support additional methods.(eg POST for fill out forms)
-
- MEMORY PARTITION
-
- The partition is set at 200K minimum, 500K ideal. In fact httpd *may* run in a partition
- of ~150K + size of largest file expected to be served out by httpd. ie If you have a
- 100K image file that can be accessed, then the partition should be at least 250K. Due
- to heap fragmentation caused during the running of the app, it is safer to run with
- 150K + (2 * sizeof (largest file)). Heap fragmentation is increased if 'debug-info-to-
- file' option is on. (See sample prefs file)
-
- Heap fragmentation should not cause too many problems, except for slowing it down. It has
- to be said though if it does crash at all, I would expect the problems to be with the
- memory management.
-
- BUGS
-
- None known yet :-)
-
- UNEXPECTED FEATURES
-
- 1. Make sure the multifinder partition is big enough (see memory above). Because httpd
- caches object retreived it need a certain amount of memory to do that. Objects cannot be
- cached in bits they have to be cached whole. This is why the size of the biggest object that
- be served out comes into the equation for determining the memory partition. This may be
- fixed in the future, although its not that bit about disintegrated cache.
-
- 2. Note point about heap fragmentation above. Later versions will have code to flush out
- cache entries more than an hour or so old, which may allow the whole cache to be cleared during
- quiet periods. Fragmentation is due to cached objects and debug info to file options.
-
- 3. At present there is nothing to stop you reuqesting the debug info or prefs file. Such action
- could have some very weird if not dangerous results, I would not recommend it.
-
- 4. Error handling seems a bit dodgy at the moment, expect odd behaviour, possible crashes if you
- issue bad requests etc
-
- ABOUT THE CODE DEVELOPMENT
-
- This is my first TCP programme. It was developed on Think C v6. I made use of some
- utilities, which you also find useful if you have any problems
-
- MacsBug - Apples low level debugger
- ZapTCP - Apple extension, helps when TCP apps crash unexpectedely
- MacTCPwatcher - Utility from Peter Lewis for testing MacTCP functions
- ZoneRanger - Utility from Joshua Golub, used for examing memory
- ProcessFinder - Utility from Edward Harp, used to kill the background app without rebooting
-
- I will release the source code for this app later, when I have had a chance to tidy it
- up a bit.
-
- It was developed on a Mac IIci, running Sys 7.1, MacTCP 2.0.4, with 20Meg of RAM. You
- won't need that much though. It will not run on a 68000 machine. It does not use any
- floating point code. It has also been run (although not for very long) on a Centris
- 610, again Sysy 7.1, MacTCP 2.0.4
-
- COMMENTS
-
- httpd is my first piece of shareware and I would be pleased to know it is being used at all.
- Please send me any comments you have. Of course useful comments that would lead to bug fixing
- would be appreciated. I always read my E-Mail and I usually reply. You can always send me
- a postcard. However if I get loads of E-Mail, I may not be able to reply. It may be better
- to post on USENet. I often read comp.sys.mac.comm, plus c.s.m.programmer and sometimes post.
-
- I rarely read newsgroups about WWW
-
- Bill Melotti
- Rm2.09, R68
- Rutherford Appleton Laboratory
- Chilton, Nr Didcot
- OXON
- OX11 OQX
- UNITED KINGDOM
- --------------------------------
-
- Bill Melotti XMas 1994
-
-
- bill.melotti@rl.ac.uk
-
-
- -- End of file --